package com.achao.interceptor.feign;

import feign.RequestInterceptor;
import feign.RequestTemplate;

/**
 * @Author: achao
 * @DateTime: 2022/10/16 0:38
 * @Description:
 * OpenFeign 拦截器
 */
public class CustomFeignInterceptor implements RequestInterceptor {

    @Override
    public void apply(RequestTemplate requestTemplate) {
        // TODO
        requestTemplate
                .header("token","123456") ;//添加请求头
                //.query("id","111") //修改参数
                //.uri("/阿超"); //修改uri

        System.out.println("OpenFeign 拦截器...");

    }
}
